<template>
    <teleport to="#message">
        <el-alert title="恭喜！" type="success" show-icon v-if="check===true" class="location">您成功登陆</el-alert>
        <el-alert title="抱歉！" type="warning" show-icon v-else class="location">您登陆失败</el-alert>
    </teleport>
</template>
<script>
import { defineComponent, onMounted, ref } from 'vue'
import useDOMCreate from '@/hooks/useDOMCreate'
export default defineComponent({
    props: {
        check: {
            type: Boolean,
            default: false
        }
    },
    setup(context, props) {
        useDOMCreate('message')
        return {}
    }
})
</script>

<style scoped>
    .location{
        position: absolute;
        top:0;
    }
</style>
